﻿<%@ Page Title="" Language="C#" MasterPageFile="~/backend/Admin.Master" AutoEventWireup="true"
    CodeBehind="AlbumPhoto.aspx.cs" Inherits="mamnontuoitho7.backend.AlbumPhoto" %>

<%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="CuteWebUI" %>
<%@ Register Assembly="FlashUpload" Namespace="FlashUpload" TagPrefix="FlashUpload" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminTitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
    <!-- Begin one column tab content window -->
    <div class="onecolumn">
        <div class="header">
            <span>Thêm Ảnh Vào Album</span>
            <div class="switchbutton">
                <a href="AlbumList.aspx" class="buttons stylebutton">Danh sách Album</a>
            </div>
        </div>
        <br class="clear" />
        <div class="content">
        <form id="form1" runat="server">
            <div id="tab2_content" class="tab_content">
                <div class="tableform">
                    <div style="float:left">
                        Tên album ảnh:<br />
                        <asp:TextBox ID="txtTitleName" runat="server" ReadOnly="true" CssClass="hidetext"
                            Style="width: 715px;"></asp:TextBox>
                        <asp:HiddenField ID = "hid_AlbumID" runat="server" />
                    </div>
                    <%--<div style="float:left" class="album_photolist">
                        <ul style="margin: 20px 0 0 0;" class="media_photos">
                            <li style="height: auto;padding: 0;">
                                <a rel="popup" href="AlbumPhotoUpload.aspx?AlbumID=<%= _productID%>" class="buttons stylebutton" style="height:auto;" title="">Đăng ảnh</a>
                             </li>
                         </ul>
                     </div>--%>
                     <br class="clear"/>
                    <%-- <div>
                       <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Đăng ảnh cho album này"
                            MultipleFilesUpload="true" OnFileUploaded="Uploader_FileUploaded" 
                            onuploadcompleted="Uploader1_UploadCompleted" >
                            <ValidateOption AllowedFileExtensions="jpeg,jpg,gif,png" MaxSizeKB="7168" />
                        </CuteWebUI:Uploader> (Dung lượng 1 hình không quá 7MB)
                    </div>--%>
                    <div style="background:#fff url(layout/theme/images/bg_uploadphoto.png) no-repeat; float:right;">
                        <FlashUpload:FlashUpload ID="flashUpload" runat="server" 
                                        UploadPage="Upload.axd" OnUploadComplete="UploadComplete()" 
                                        FileTypeDescription="Images" FileTypes="*.gif; *.png; *.jpg; *.jpeg" 
                                        UploadFileSizeLimit="6300000"  />
                        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"></asp:LinkButton>
                    </div>
                </div>
                <br class="clear" />
            </div>
             </form>
            <div class="album_photolist">
                <ul class="media_photos">
                    <% for (int i = 0; i < _dtImage.Rows.Count; i++)
                       { %>
                    <li>
                        <form method="post" action="AlbumPhoto.aspx?ProductID=<%= _productID %>">
                        <input type="hidden" id="Hidden2" name="hidImageIDDelete" value="<%=_dtImage.Rows[i]["ImageID"].ToString()%>" />
                        <input type="hidden" id="Hidden1" name="hidImageNameDelete" value="<%=_dtImage.Rows[i]["ImageName"].ToString()%>" />
                        <button type="submit" value="" class="delphoto" title="Xóa" onclick="javascript: if (confirm('Bạn muốn xóa ảnh này?')) { window.location ='AlbumPhoto.aspx?ProductID=<%= _productID %>' } else { return false };" >
                        </button>
                        </form>
                        
                        <a rel="slide" href="../images/album/album-<%= _productID%>/photo/<%=_dtImage.Rows[i]["ImageName"].ToString() %>" title="">
                            <img src="../images/album/album-<%= _productID%>/photo/thumbnail/<%=_dtImage.Rows[i]["ImageName"].ToString() %>" alt="" />
                        </a>
                     </li>
                    <%} %>
                </ul>
            </div>
            <!--end photo-->
        </div>
    </div>
    <!-- End one column tab content window -->
    
</asp:Content>
